package com.example.smartf.model.mysql;

import javax.persistence.*;

@Entity
@Table(name = "traindata")
public class Traindata {

    @EmbeddedId
    private TraindataKey traindataKey;

    @Column(name = "co2")
    private Double co2;

    @Column(name = "ec")
    private Double ec;

    @Column(name = "ph")
    private Double ph;

    @Column(name = "rh")
    private Double rh;

    @Column(name = "temp")
    private Double temp;

    @Column(name = "lighttime")
    private Double lighttime;

    @Column(name = "light")
    private Double light;

    @Column(name = "cgr")
    private Double cgr;

    public Traindata() {
    }

    public Traindata(TraindataKey traindataKey) {
        this.traindataKey = traindataKey;
    }

    public Traindata(TraindataKey traindataKey, Double co2, Double ec, Double ph, Double rh, Double temp, Double lighttime, Double light) {
        this.traindataKey = traindataKey;
        this.co2 = co2;
        this.ec = ec;
        this.ph = ph;
        this.rh = rh;
        this.temp = temp;
        this.lighttime = lighttime;
        this.light = light;
    }

    public TraindataKey getTraindataKey() {
        return traindataKey;
    }

    public void setTraindataKey(TraindataKey traindataKey) {
        this.traindataKey = traindataKey;
    }


    public Double getCo2() {
        return co2;
    }

    public void setCo2(Double co2) {
        this.co2 = co2;
    }

    public Double getEc() {
        return ec;
    }

    public void setEc(Double ec) {
        this.ec = ec;
    }

    public Double getPh() {
        return ph;
    }

    public void setPh(Double ph) {
        this.ph = ph;
    }

    public Double getRh() {
        return rh;
    }

    public void setRh(Double rh) {
        this.rh = rh;
    }

    public Double getTemp() {
        return temp;
    }

    public void setTemp(Double temp) {
        this.temp = temp;
    }

    public Double getLighttime() {
        return lighttime;
    }

    public void setLighttime(Double lighttime) {
        this.lighttime = lighttime;
    }

    public Double getLight() {
        return light;
    }

    public void setLight(Double light) {
        this.light = light;
    }

    public Double getCgr() {
        return cgr;
    }

    public void setCgr(Double cgr) {
        this.cgr = cgr;
    }

    @Override
    public String toString() {
        return "Traindata{" +
                "traindataKey=" + traindataKey +
                ", co2=" + co2 +
                ", ec=" + ec +
                ", ph=" + ph +
                ", rh=" + rh +
                ", temp=" + temp +
                ", lighttime=" + lighttime +
                ", light=" + light +
                ", cgr=" + cgr +
                '}';
    }
}
